



from pydantic import BaseModel, Field
from typing import List, Dict, Optional, Union


class UserConfigInfoSchemas(BaseModel):
    model_name: int = Field(title="用于 AI 标注")
    attributes: dict = Field(title="标签快捷键等属性配置")
    file_id_list: dict = Field(title="文件列表（包括本地和网络访问路径）")
    current_file_id: dict = Field(title="文件列表（包括本地和网络访问路径）")
    project_name: str = Field(title="项目名称")
    
    
class JobSchemas(BaseModel):
    user_data: UserConfigInfoSchemas = Field(title="用户数据")
    annotate_data: Dict[str,Dict[str,Union[str,int]]] = Field(title="标注数据via2格式: {image id: {label: label_id, ...}}")
    
class BaseJobs(BaseModel):
    Job_data: Dict[str,JobSchemas] = Field(title="工作数据: {job id: JobSchemas()}")